package com.qbw.app.module.common.util;

import com.http.okhttp.HttpTask;
import com.lib.util.NetUtil;
import com.lib.util.ResUtil;
import com.qbw.app.R;
import com.qbw.app.XApplication;

/**
 * @author QBW
 * @date 2019-12-15
 */
public class HttpRequestUtil {
    public static String getMessage(int code, String message) {
        return code == HttpTask.FAILUE ? ResUtil.getString(NetUtil.isNetAvailable(XApplication.getInstance()) ? R.string.system_error_tip : R.string.net_error) : message;
    }
}
